<?php

$section = 'technician';
$titre = _LB_TECHNICIAN_MANAGEMENT;
$smarty->assign('titre', $titre);

$id = Request::getIntNumber('id');
$gid = Request::getIntNumber('gid');
$backlink = Session::getBackLink('service');
$currentlink = APPLICATION_URL . "/service/delete/?id=". $id;

if($id>0){
	$service = new Service_Booking();
}
if($gid>0){
	$service = new Service_Group();
}
if(!$service->get($id))
	redirect($backlink);
if($service->canBeDeleted($id))
	$service->delete();

redirect($backlink);